public class valueTranmit {

    public static void main(String[] args) {

        //值传递
      /*  int nums = 100;
        setValue(nums);
        System.out.println("nums == " + nums);
*/
        //将对象作为参数传递
        Test test = new Test();
        test.setName("修改前");

        setTestValue(test);
        System.out.println("对象传递前： " + test.getName());



    }
    public static void setValue(int num) {
        num = 111;
        System.out.println("setValue == " + num);
    }


    public static void setTestValue(Test name) {
        name = new Test();
        name.setName("修改后");
        System.out.println("对象传递后： " + name.getName());
    }


}

class Test{
    public String name =  "左宽鹏";

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Test(String value){
        name =  "左宽鹏111";


    }
    public Test(){


    }

}